package model

import java.util.List
import java.util.Random

abstract class AdminPistas {

	@Property List<Pista> pistas
	
	abstract def List<Pista> darPista() 
	
	
}


class SinPistas extends AdminPistas {

	new(){
		this.pistas = newArrayList => [ add(new NoPista)]
	}
	
	override def  List<Pista> darPista() {
		this.pistas
	}
}

class PistaEmbajada extends AdminPistas {
	

	new(Pais pais) {
		this.pistas = newArrayList => [
			add(new PistaDeDestinoDelVillano(pais))
			add(new PistaDeDestinoDelVillano(pais))
		]
	}
	
	override darPista() {
		this.pistas
	}
}

class PistaBanco extends AdminPistas {

	
	new(Pais pais, Villano villano) {
		this.pistas = newArrayList => [
			add(new PistaDeDestinoDelVillano(pais))
			add(new PistaDeSenhaParticular(villano))
		]
	}
	
	
	override darPista() {
		this.pistas
	}
}

class PistaBiblioteca extends AdminPistas {
	
	private var Random probabilidad = new Random
	
	new(Pais pais, Villano villano) {
		this.pistas = newArrayList => [
			add(new PistaDeDestinoDelVillano(pais))
			add(new PistaDeSenhaParticular(villano))
			if(probabilidad.nextDouble >= 5) add(new PistaDeHobbie(villano))
		]
	}
	
	override darPista() {
		this.pistas
	}
}

class PistaClub extends AdminPistas {
	
	private var Random probabilidad = new Random
	
	
	new(Villano villano) {
		this.pistas = newArrayList => [
			add(new PistaDeSenhaParticular(villano))
			add(new PistaDeSenhaParticular(villano))
			if(probabilidad.nextDouble >= 7) add(new PistaDeHobbie(villano))
		]
	}

	override darPista() {
		this.pistas
	}
}

class VillanoEnLaCiudad extends AdminPistas {
	
	new(){
		this.pistas = newArrayList => [
			add(new MensajeVillanoEnCiudad)
		]
	}
	
	override darPista() {
		this.pistas
	}
	
}

class GuaridaVillano extends AdminPistas {
	
	
	new(Villano v){
		this.pistas = newArrayList => [
		add(new MensajeGuaridaVillano(v.nombre))
		]
	}
	
	override darPista() {
		this.pistas
	}
	
	
}